<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String source= request.getRequestURL().toString();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<SCRIPT TYPE="text/javascript" src=formvalid.js>
    </SCRIPT> 	
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <link href="css.css" rel="stylesheet" type="text/css">
  </head>
  
<body>
<base href="<%=basePath%>">
   <base href="<%=basePath%>">
<SCRIPT TYPE="text/javascript">
// Only script specific to this form goes here.
// General-purpose routines are in a separate file.
  function validateOnSubmit() {
    var elem;
    var errs=0;
    // execute all element validations in reverse order, so focus gets
    // set to the first one in error.
    //if (!validateTelnr  (document.forms.demo.telnr, 'inf_telnr', true)) errs += 1; 
  //  if (!validateAge    (document.forms.demo.age,   'inf_age',  false)) errs += 1; 
    if (!validateEmail  (document.forms.demo.email, 'inf_email', true)) errs += 1; 
    if(!validateAboutuser(document.forms.demo.aboutUser,'inf_abtuser',true)) errs +=1;
   // if (!validateuserName(document.forms.demo.userName,  'inf_from'))        errs += 1; 
    //if (!validateuserPassword(document.forms.demo.userPassword,  'inf_password'))        errs += 1; 
    //if (!validateuserRePassword(document.forms.demo.userRePassword,  'inf_repassword'))        errs += 1; 

    if (errs>1)  alert('There are fields which need correction before sending');
    if (errs==1) alert('There is a field which needs correction before sending');

    return (errs==0);
  };

function change_image(value){
 var img=document.getElementById('myimage');
 switch(value){
  case '1' :img.src="jsp/web/image/IMG_HOME_IMG3.jpg"
              break;
  case '2' :img.src="jsp/web/image/IMG_HOME_IMG2.jpg"
              break;  
 }
}

</SCRIPT>
<html:form action="setupActions.do" method="post" enctype="multipart/form-data">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  <tr align="left" valign="top" bgcolor="#CCCCCC">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr align="left" valign="top">
    <td width="50%" bgcolor="#CCCCCC">&nbsp;</td>
    <td bgcolor="#FFFFFF"><table border="0" cellpadding="3" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
      <tr>
        <td><table align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="1039" colspan="2" align="left" valign="top"><img src="jsp/web/image/img_header.jpg" width="770" height="1"></td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top"><iframe src="jsp/web/header1.jsp" width="100%"
scrolling="no"
marginwidth="0" marginheight="0" frameborder="0"> </iframe></td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top"><table border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="33" align="left" valign="top">&nbsp;</td>
                    <td colspan="3" align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                    <td colspan="3" align="left" valign="top" class="star"><strong>Congratulations!</strong></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                    <td colspan="3" align="left" valign="top" class="table_content" >Your account is ready. Now you can start using QuestionForge as a registered member! </td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                    <td colspan="3" align="left" valign="top"><span class="username">One more step...</span>
                        <p class="table_content">We strongly recommond you to provide the following for better experience with QuestionForge. Note: You can always <br>
                    edit these data by selecting My home-Account.</p></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp; </td>
                    <td colspan="3" rowspan="2" align="left" valign="top"><table border="0" align="left">
                        <tr align="left" valign="top">
                          <td width="136" align="center" valign="middle"><table border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td><span class="username">Avatar:&nbsp;&nbsp;</span>&nbsp;</td>
                                <td><img id="myimage" src="jsp/web/image/IMG_HOME_IMG2.jpg" width="40" height="40" border="0"></td>
                              </tr>
                          </table></td>
                          <td width="65" align="center" valign="middle"><html:radio property="avataropt" value="avatar1"></html:radio></td>
                          <td colspan="2" valign="middle"><p><span class="table_content">select from the list </span><br>
                          </p></td>
                          <td width="18" valign="middle">&nbsp;</td>
                          <td width="134" valign="middle">&nbsp;</td>
                        </tr>
                        <tr align="left" valign="top">
                          <td colspan="2" align="center" valign="middle">&nbsp;</td>
                          <td colspan="2" valign="middle"><html:select property="gender" onchange="change_image(this.value);">
                            <option value="1">Male </option>
                            <option value="2">Female</option><br>
                            
                          </html:select> </td>
                          <td valign="middle"><img src="jsp/web/image/img_question.jpg" width="18" height="18"></td>
                          <td valign="middle">&nbsp;</td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle"><html:radio property="avataropt" value="avatar2"></html:radio></td>
                          <td colspan="4" valign="middle"><p><span class="smalltext">upload my own image (40x40 piexels recommended):</span><br>
                          </p></td>
                        </tr>
                        <tr align="left" valign="top">
                          <td colspan="2" align="center" valign="middle">&nbsp;</td>
                          <td colspan="4" valign="middle"><html:file property="avatar" size="34"></html:file></td>
                        </tr>
                        <tr align="left" valign="top">
                          <td colspan="2" align="left" valign="middle" class="username">About me: </td>
                          <td colspan="3" align="left" valign="middle" class="username"><html:textarea property="aboutUser" cols="25" rows="5" onblur="validateAboutuser(this,'inf_abtuser');"></html:textarea></td>
                          <td align="left" valign="top"><img src="jsp/web/image/img_question.jpg" width="18" height="18"></td>
                        </tr>
                        <tr align="left" valign="top">
                          <td colspan="2" align="left" valign="middle" class="username">Email address: </td>
                          <td colspan="3" align="left" valign="middle"><html:text property="email" size="25" onblur="validateEmail(this,'inf_email');"></html:text></td>
                          <td align="left" valign="top"><img src="jsp/web/image/img_question.jpg" width="18" height="18"><html:hidden property="loginSite" value="<%=source%>"/></td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td colspan="3" align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td width="130" align="center" valign="middle">&nbsp;</td>
                          <td width="21" align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td colspan="4" align="left" valign="middle"><table width="75%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><a class="button_long" href="#"><span class="button_long"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Submit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></span></a></td>
                              <td>&nbsp;</td>
                              <td><a class="button_long" href="#"><span class="button_long"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></span></a></td>
                            </tr>
                          </table></td>
                          </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="left" valign="middle">&nbsp;</td>
                          <td colspan="3" align="left" valign="middle">&nbsp;</td>
                        </tr>
                        <tr align="left" valign="top">
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="center" valign="middle">&nbsp;</td>
                          <td align="left" valign="middle"><span class="table_content"><a href="#"> </a><a href="#"> </a></span> <span class="table_content"> </span></td>
                          <td colspan="3" align="left" valign="middle"><span class="table_content"><a href="#"> </a></span></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="right" valign="top" class="username">&nbsp;</td>
                    <td width="222" align="center" valign="middle"><span class="table_content"><a href="#"> </a><a href="#"> </a></span></td>
                    <td width="223" align="center" valign="middle"><span class="table_content"><a href="#"> </a></span></td>
                    <td width="226" align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="right" valign="top" class="username">&nbsp;</td>
                    <td colspan="2" align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top"><iframe src="jsp/web/footer1.jsp" width="100%" height="85"
scrolling="no"
marginwidth="0" marginheight="0" frameborder="0"> </iframe></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
    <td width="50%" bgcolor="#CCCCCC">&nbsp;</td>
  </tr>
  <tr align="left" valign="top" bgcolor="#CCCCCC">
    <td bgcolor="#CCCCCC">&nbsp;</td>
    <td bgcolor="#CCCCCC">&nbsp;</td>
    <td bgcolor="#CCCCCC">&nbsp;</td>
  </tr>
</table>
</html:form>
</body>
</html>
